package com.sdk.chris.usersdk.sentinel;

import com.common.chris.entity.R;
import com.github.pagehelper.PageInfo;
import com.sdk.chris.usersdk.dto.UserDTO;
import com.sdk.chris.usersdk.feign.UserTestFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class UserTestFallback implements UserTestFeignClient {

    @Override
    public R<PageInfo<UserDTO>> listUser() {// 降级后调用的方法
        PageInfo<UserDTO> pageInfo = new PageInfo<>();
        return new R(100, false, new UserDTO());
    }

    @Override
    public R<Integer> add() {
        log.info("----------------方法被降级了");
        return null;
    }
}
